
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>EHS中国信息管理系统</title>
    <link rel="stylesheet" type="text/css" href="__ROOT__/Public/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="__ROOT__/Public/themes/icon.css" />
    <link href="__ROOT__/Public/Css/ehs-admin.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery-1.5.0.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="__ROOT__/Public/Js/core.js"></script>
    <script type="text/javascript" src="__TMPL__/js/index.js"></script>
    <script type="text/javascript" >
      var dev = "{$dev}";
      function setTab1(m,n){
        var menu=document.getElementById("tab"+m).getElementsByTagName("li");   //获取ID为tab+m标签下的li标签
        var showdiv=document.getElementById("tablist"+m).getElementsByTagName("div");   //获取ID为tablist+m标签下的div标签
        for(var i=0;i<menu.length;i++)
        {
          menu[i].className=i==n?"now":"";   //如果i=n;那么menu[i].classname为now
          showdiv[i].style.display=i==n?"block":"none";   //如果如果i=n;那么showdiv[i].style.display为block"
        }
      }
      $(function() {
        $("#category h2").click(function(){
          $("#category h2 span").removeClass('down');
          $(this).next('ul').show('fast').siblings('ul').hide();
          $(this).find('span').addClass('down');
          $("#category h2").next().attr("display",1);
        })
      });
      
      var showPos = {left:695,top:157};
      if (dev == 1) showPos = {left:695,top:277};

      $(function(){
        $('#mm').menu();
        $('#collect').click(function(){
          $('#mm').menu('show',showPos);
        });
        /*      $(document).bind('contextmenu',function(e){
          $('#mm').menu('show', {
            left: e.pageX,
            top: e.pageY
          });
          return false;
        }); */
      });

      $(function(){
        $('#tt1').tree();
      });

    </script>
  </head>
  <body class="layout-container" oncontextmenu="return false">
  <if condition="$dev eq 1">
    <div region="north" border="false" style="height:113px;">
      <div id="header">
        <div id="help">
          <ul>
            <li><a href="javascript:alert('正在开发中')" title="文件" class="icon-document">文件</a></li>
            <li><a href="javascript:alert('正在开发中')" title="查看" class="icon-check">查看</a></li>
            <li><a href="javascript:alert('正在开发中')" title="帮助" class="icon-help">帮助</a></li>
          </ul>
        </div>

        <div id="logo">
          <h1><a href="__URL__"><img src="__ROOT__/Public/Images/logo.png" alt="" title="" /></a></h1>
        </div>

        <div id="main-nav">
          <ul>
            <li><a href="__URL__/index/nid/1" title="" class="icon-news">新闻</a></li>
            <li><a href="__URL__/index/nid/2" title="" class="icon-law">法规</a></li>
            <li><a href="__URL__/index/nid/3" title="" class="icon-data">资料</a></li>
            <li><a href="javascript:alert('正在开发中')" title="" class="icon-bbs">社区</a></li>
            <li><a href="javascript:alert('正在开发中')" title="" class="icon-train">培训</a></li>
            <li><a href="javascript:alert('正在开发中')" title="" class="icon-ehs">企业EHS解决方案</a></li>
            <li><a href="javascript:alert('正在开发中')" title="" class="icon-d-ehs">企业文件夹</a></li>
            <li><a href="__URL__/setting/uid/{$uid}" title="" class="icon-news">用户配置</a></li>
            <li><a href="__ROOT__/public.php/law" title="" class="icon-news">法规搜索页面</a></li>
          </ul>
        </div>
      </div>
    </div>
  </if>

  <div region="west" split="true" style="width:300px; border-left:10px solid #0C7DD4; border-bottom:10px solid #0C7DD4;">
    <div id="sidebar" >
      <div class="tab" >
        <div class="tab-title" id="tab2">
          <ul>
            <li class="now" onClick="setTab1(2,0)"><a href="#" title="">{$channelName}频道</a></li>
            <li onClick="setTab1(2,1)"><a href="#" title="">{$channelName}收藏夹</a></li>
            <li onClick="setTab1(2,2)"><a href="#" title="">我要发布</a></li>
          </ul>
        </div>
        <div class="tab-cont" id="tablist2">

          <!-------------------频道列表------------------>
          <div class="tablist block" id="category" >
            <volist name="info" id="vo" key="i">
              <h2 <if condition="$i eq 5"> style="display:none"</if>><span></span><a href="javascript:void(0)">{$channel[$i]}</a></h2>
              <ul style="display:none" display="0">
                <volist name="vo" id="l" key="j">
                  <li><a href="javascript:void(0)" onClick="clickChannel('{$l.id}','{$i}','{$nid}')">{$l.title}</a></li>
                </volist>
              </ul>
            </volist>
          </div>
          <!-----------------/End 频道列表----------------------------->


          <!------------------------收藏夹功能------------------------------>
          <div id="divFavList" class="tablist" style="display:none; padding:10px;">
            <ul id="tt1">
              <li>
                <div class="tree-node"><span class="tree-folder tree-folder-open icon-star4"></span><span class="tree-title" oncontextmenu="rightclickMenu(event,this,0,1,1)">我的收藏夹</span></div>
              </li>
              <volist name="favorite" id="vo">
                <li>
                  <span>
                    <a href="javascript:void(0)" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vo.id}',1,2)">{$vo.title}</a>
                    <input type="text" value="{$vo.title}" style="display:none" onBlur="changeInputValue(this,'{$vo.id}',1)"/>
                  </span>
                  <ul>
                    <volist name="vo.downLine" id="vd">
                      <li>
                        <span>
                          <a href="javascript:void(0)" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vd.id}',1,3)">{$vd.title}</a>
                          <input type="text" value="{$vd.title}" style="display:none" onBlur="changeInputValue(this,'{$vd.id}',1)"/>
                        </span>
                        <ul>
                          <volist name="vd.downLine" id="vl">
                            <li>
                              <span>
                                <a href="javascript:void(0)" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vl.id}',1,4)">{$vl.title}</a>
                                <input type="text" value="{$vl.title}" style="display:none" onBlur="changeInputValue(this,'{$vl.id}',1)"/>
                              </span>
                            <if condition="count(vl._list) gt 0">
                              <ul>
                                <volist name="vl._list" id="vll">
                                  <li>
                                    <span>
                                      <a href="javascript:void(0)" onClick="clickFavoriteTitle('{$vll.type}','{$vll.tid}')" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vll.id}',2,9)">{$vll.title}</a>
                                      <input type="text" value="{$vll.title}" style="display:none" onBlur="changeInputValue(this,'{$vll.id}',2)"/>
                                    </span>
                                  </li>
                                </volist>
                              </ul>
                            </if>
                            </li>
                          </volist>
                        </ul>
                      </li>
                      <if condition="count(vd._list) gt 0">
                        <volist name="vd._list" id="vdl">
                          <li>
                            <span>
                              <a href="javascript:void(0)" onClick="clickFavoriteTitle('{$vdl.type}','{$vdl.tid}')" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vdl.id}',2,9)">{$vdl.title}</a>
                              <input type="text" value="{$vdl.title}" style="display:none" onBlur="changeInputValue(this,'{$vdl.id}',2)"/>
                            </span>
                          </li>
                        </volist>
                      </if>
                    </volist>
                  </ul>
                </li>

                <if condition="count(vo._list) gt 0">
                  <volist name="vo._list" id="vol">
                    <li>
                      <span>
                        <a href="javascript:void(0)" onClick="clickFavoriteTitle('{$vol.type}','{$vol.tid}')" onDblClick="dbclickChangeName(this)" oncontextmenu="rightclickMenu(event,this,'{$vol.id}',2,9)">{$vol.title}</a>
                        <input type="text" value="{$vol.title}" style="display:none" onBlur="changeInputValue(this,'{$vol.id}',2)"/>
                      </span>
                    </li>
                  </volist>
                </if>
              </volist>
            </ul>
          </div>


          <div class="tablist"  style="display:none;">tablist3</div>
        </div>
      </div>
    </div><!-- /End Sidebar -->
  </div>


  <div region="center" style="border-right:10px solid #0C7DD4; border-bottom:10px solid #0C7DD4;">
    <div id="main-cont">
      <!------------------------------------TOP信息---------------------------------->
      <div id="list-news-index" region="north" split="true" style="height:100px; overflow:auto;">
        <table class="grid">
          <thead>
            <tr>
              <td width="700px">标题</td>
              <td width="200px">作者</td>
              <td>发布时间</td>
            </tr>
          </thead><tbody style="display:none"><tr><td></td></tr></tbody>
        </table>
        <div id="divLoadingList" style="display: none"><img src="__ROOT__/Public/images/loading.gif"/></div>
        <div id="divList">
          <table class="grid">
            <tbody>
            <volist name="newsList" id="list" >
              <tr>
                <td width="700px"><a href="javascript:void(0)" onClick="clickTitle('{$list.id}')">{$list.title}</a></td>
                <td width="200px">{$list.username}</td>
                <td>{$list.updatetime}</td>
              </tr>
            </volist>
            </tbody>
          </table>
        </div>
      </div>
      <!----------------------------------- /End TOP信息 --------------------------------------->



      <div id="reader-warp-index">
        <div id="reader-toolbar">
          <ul>
            <li><a href="javascript:alert('正在开发中')" title="新建" class="icon-new">新建</a></li>
            <li><a href="javascript:alert('正在开发中')" title="保存" class="icon-save">保存</a></li>
            <li><a href="javascript:alert('正在开发中')" title="上一步" class="icon-pre">上一步</a></li>
            <li><a href="javascript:alert('正在开发中')" title="下一步" class="icon-next">下一步</a></li>
            <li><a href="javascript:alert('正在开发中')" title="刷新" class="icon-refresh">刷新</a></li>
            <li><a href="javascript:alert('正在开发中')" title="关闭" class="icon-close">关闭</a></li>
            <li><a href="javascript:alert('正在开发中')" title="上一条" class="icon-pre-info">上一条</a></li>
            <li><a href="javascript:alert('正在开发中')" title="下一条" class="icon-next-info">下一条</a></li>
            <li><a href="javascript:void(0)" title="收藏" class="icon-collect" id="collect">收藏</a></li>
            <li><a href="javascript:alert('正在开发中')" title="链接" class="icon-link">链接</a></li>
            <li><a href="javascript:alert('正在开发中')" title="设置" class="icon-set">设置</a></li>
            <li><a href="javascript:alert('正在开发中')" title="搜索" class="icon-sreach">搜索</a></li>
          </ul>
        </div>
        <div id="reader-cont" style="height:560px; overflow:auto;">
          <div id="message" >
            <ul>
              <li><a href="#" title="">精彩推荐</a></li>
              <li><a href="#" title="">功能演示</a></li>
              <li><a href="#" title="">帮助</a></li>
              <li><a href="#" title="">留言</a></li>
            </ul>
          </div>
          <div id="divLoadingArticle" style="display: none"><img src="__ROOT__/Public/images/loading.gif"/></div>
          <!----------------------------------文章内容-------------------------------------->
          <div id="article">
            <!--   <if condition="$nid neq 3">
                 <div class="article-title">
                   <h2>{$newsContent.title}</h2>
                   <div class="article-info">
                     <span>来源：中国报 </span>
                     <span>发布：能源</span>
                     <span>日期：{$newsContent.updatetime}</span>
                   </div>
                 </div>
               </if>-->
            <div class="article-cont">
              <if condition="$nid eq 3">
                <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="900" height="600">
                  <param name="movie" value="http://www.ehs.cn/admin_swf/{$newsContent['content']}.swf" />
                  <param name="quality" value="high" />
                  <embed src="http://www.ehs.cn/admin_swf/{$newsContent['content']}.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="600" ></embed>
                </object>
                <else/>
                {$newsContent.content}
              </if>

            </div>
          </div>
          <!------------------------------/END 文章内容---------------------------------------------->
        </div>
      </div>
    </div><!-- /End Main-cont -->
  </div>

  <div id="mm" style="width:180px;">
    <!-- <div onclick="javascript:alert('添加到收藏夹')" icon="icon-save-add">添加到收藏夹</div>
     <div class="menu-sep"></div>  -->
    <volist name="favorite" id="fa1">
      <div onclick="clickFavFlie('{$fa1.id}')">
        <span class="icon-document2" >{$fa1.title}</span>
        <div style="width:180px;">
          <volist name="fa1.downLine" id="fa2">
            <div class="icon-document2" onclick="clickFavFlie('{$fa2.id}')">
              <span >{$fa2.title}</span>
              <div style="width:180px;">
                <volist name="fa2.downLine" id="fa3">
                  <div icon="icon-star3" onclick="clickFavFlie('{$fa3.id}')">{$fa3.title}</div>
                </volist>
                <div icon="icon-save2" onclick="clickNewFavFile('{$fa2.id}',3)">新建文件夹</div>
              </div>
            </div>
          </volist>
          <div icon="icon-save2" onclick="clickNewFavFile('{$fa1.id}',2)">新建文件夹</div>
        </div>
      </div>
    </volist>
    <div icon="icon-save2" onclick="clickNewFavFile(0,1)">新建文件夹</div>
    <div class="menu-sep"></div>
  </div>

  <div id="divRightClick" style="width:100px">
    <div id="divNewFile">新建文件夹</div>
    <div id="divRepeat">重名题</div>
    <div id="divDelete">删除</div>
  </div>
  <a id="lnkHiddent" href="javascript:void(0)" style="display:none"></a>

  <script>
    var uid = "{$uid}";//用户id
    var nid = "{$nid}";//1-新闻，2-法规，3-资料
    var url = "__URL__";//默认首页
    //发现TP一个很白痴的问题，cinfo={id:"{$cid}",title:"{$ctitle}"}竟然"{$cid}"和"{$ctitle}"是字符串
    var cid = "{$cid}", ctitle = "{$ctitle}",cinfo = {id:cid,title:ctitle};
    var r = {};//用来存储删除文件和文件夹信息的变量
    //setTimeout(function(){alert("{$aa}")},1000)
    if ("{$issetting}" == 0) {
      var rt = confirm("您还没有对频道列表进行设置，是否现在去设置");
      if (rt){
        window.location.href = url+"/setting/uid/{$uid}";
      }
    }

    //$(document).ready(function() {});
  </script>
</body>
</html>
